<ol class="dd-list">
@foreach($sidebars as $sidebar)
    <li class="dd-item dd-nodrag" data-id="{{$count}}">
        <div class="dd-handle">
            <i class="fa {{$sidebar['icon']}}"></i>&nbsp;<strong>{{$sidebar['name']}}</strong>&nbsp;&nbsp;&nbsp;<a href="/demo/" class="dd-nodrag">{{$sidebar['url']}}</a>
            @forelse($sidebar['roles'] as $role)
                <span class="label label-info">{{$role['display_name']}}</span>
                @if($loop->index >= 4)
                    ...
                    @break
                @endif
            @empty
            @endforelse
            <span class="pull-right dd-nodrag">
                <a href="/menus/update?id={{$sidebar['id']}}"><i class="fa fa-edit"></i></a>
                <a href="javascript:void(0);" data-id="{{$sidebar['id']}}" class="tree_branch_delete delete-sidebar"><i class="fa fa-trash"></i></a>
            </span>
        </div>
        @if(isset($sidebar['child']))
            @component('admin.component.sidebar-item', ['sidebars' => $sidebar['child'], 'count'=> (++$count)])

            @endcomponent
        @endif
    </li>
@endforeach
</ol>
